//
//  CYNavigationController.m
//  CaiYun
//
//  Created by 今日信息科技 on 2017/9/14.
//  Copyright © 2017年 今日信息科技. All rights reserved.
//

#import "CYNavigationController.h"
#import "CYTabBarController.h"
#import "AppDelegate.h"
@interface CYNavigationController ()

@end

@implementation CYNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    viewController.hidesBottomBarWhenPushed = YES;
    [super pushViewController:viewController animated:animated];
    
    NSString *classString = NSStringFromClass([self.topViewController class]);
    NSArray *VC = @[@"CYBuyViewController", @"CYTicketNoticeViewController", @"CYOrderViewController", @"CYUserViewController"];
    if ([VC containsObject:classString]){
         viewController.hidesBottomBarWhenPushed = NO;
    }
    


//        self.topViewController.hidesBottomBarWhenPushed = NO;
   
}
/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
